GNUH8 v0803

October 6th, 2008

KPIT Cummins Infosystems Limited is releasing GNUH8 v0803, a cross compiler toolchain for Renesas 

(formerly Hitachi and Mitsubishi) H8 series of microcontrollers.

SALIENT FEATURES:

1.   

The GNUH8 v0803 is based on gcc-4.3.1 [released], binutils-2.18.50 [dated 30th July 2008], newlib-1.16.0 [released], gdb-6.8.50 [dated 11th August 2008].

2. The latest patches are applied to gcc, binutils and newlib sources. Please refer to the link given below for the patches applied to the GNUH8 toolchain,
http://www.kpitgnutools.com/phpmyfaq/index.php?aktion=artikel&rubrik=001005&id=42&lang=en
3. The KPIT GNUH8 toolchain installer is upgraded to support installation on Windows Vista.
4. Bit manipulation instructions (BNOT, BSET, BCLR and BILD) are implemented for H8SX target for register indirect addressing mode.
5. Conditional bit instructions (BCLR/EQ, BCLR/NE, BSET/EQ and BCLR/EQ) are implemented for H8SX target to improve code optimisation.
6.

The windows installer is modified to store the e-mail address and the activation code entered by the user during the first installation on the system. For any subsequent installations (of higher tooolchain versions) / re-installation, the installer will display the stored e-mail address and activation code in the "Authentication" dialog box. The user will not have to enter the detail during every installation.

ABOUT GNUH8 v0803:

Release version: GNUH8 v0803
Release Date: October 6th, 2008
Platforms Supported: Red Hat GNU/Linux v8.0 or later (or compatible distribution)
Windows NT/2000/XP/Vista
Language: C, C++
Targets:

H8/300, 

H8/300L, 

H8/300H,

H8/300H Tiny Series,

H8/S 2XXX,

H8/S 26XX,

H8/SX

Object File Format: ELF


For free technical support register at http://www.kpitgnutools.com
For your feedback and suggestions visit http://www.kpitgnutools.com/feedback.php

CHANGES IN THIS RELEASE:

This section describes the enhancements and fixed problems in this release.

GCC:

1. Bit manipulation instructions (BNOT, BSET, BCLR and BILD) are implemented for H8SX target for register indirect addressing mode.
2.

Conditional bit instructions (BCLR/EQ, BCLR/NE, BSET/EQ and BCLR/EQ) are implemented for H8SX target to improve code optimisation.

3.

The used registers were not pushed on the stack in case of interrupt service routines when optimisation was enabled ('-O2', '-O3' and '-Os'). This problem occurred for toolchain versions v0602 and above.

This problem is now fixed.

4. The GMP and MPFR libraries are required while building the toolchains as well as building target applications for gcc-4.3.1. The GNUH8 v0803 toolchain is built by statically linking the GMP and MPFR libraries.
5.

In case of H8SX, the following code when compiled without optimisation generated a negative jump instead of a positive one, thereby resulting in a program crash. This happened only when the size of the 'for' loop was exactly 0x80 bytes.

 

typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned long uint32;

int
main ()
{

uint8 div;
unsigned long peripheral_frequency;
unsigned long brr,baud_bits;
static const uint16 div_vals[] = {1,4,16,64};
baud_bits = 11;
for(div = 0;div < 4;div++){
brr = (peripheral_frequency * 20) / ((uint32)64 * div_vals[div + 1] * baud_bits);
brr += 5;
brr /= 11;
if(brr < 256){
break;
}
}

return 0;
}

This problem is now fixed.    

BINUTILS:

1.

The assembly instruction "MOV.W #H'1234,R0" generated "Illegal Symbol 'H' for Hex representation (use 0x)" error.

This bug is now fixed. An assembler option '-h-tick-hex' is added to support "H'00" syntax for hexadecimal representation.

OPTIMISED LIBRARIES:

1. The following LIBC Library functions are enhanced to generate improved code optimisation for H8SX target,
a. atoi
b. atol
c. atof
d. qsort
2. The following LIBM Library function is enhanced to generate improved code optimisation for H8SX target,
a. pow
3.

The 'strtol' function from optimised libraries not work for H8SX target.                                       

This bug is now fixed.

4. Addition of float variables generated wrong values in optimised libraries for H8SX target.     

This bug is now fixed.

HEW (For Windows OS only):

1. The value of global variable was not visible in the HEW 'Watch' window while debugging applications having inline functions defined.
This bug is now fixed.
2. Support for 6 additional H8 targets is added in KPIT HEW project generator.
3.

In case of Windows XP, for project with many source files, if the length of the linker command exceeded 8192 characters, the linker did not generate the output file.  

This problem is now fixed. The object files are passed to the linker using a separate linker script.         

4. The v0803 toolchain samples are installed at the following location on Windows Vista, "C:\Users\<Username>\Documents\KPIT Cummins\<Toolchain name>"

 

 

KNOWN PROBLEMS IN H8-ELF:

 

This section describes the known problems in this release. We intend to fix the known problems in our future

releases.
We also release Maintenance Packs for critical bugs fixed in between releases.

 

Windows and GNU/Linux:

1.

The following code when compiled for H8300H, H8300HN, H8S, H8SN, H8SX, H8SXN targets with optimisation option '-O1' or above, generates wrong assembly code.

unsigned int ReadWordx86Style(unsigned long lAddr)
{
unsigned char baBuff[2];
baBuff[0x00]=*((unsigned char *)((unsigned int)(lAddr+1)));
baBuff[0x01]=*((unsigned char *)((unsigned int)(lAddr+0)));
return((*(unsigned int *)baBuff));
}

int start(void)
{
unsigned char baBuff[256];
unsigned int wResult;
wResult = ReadWordx86Style((unsigned long)((unsigned int)baBuff));
return(wResult);
}

2.

The '.tinybss' implementation does not work as expected.

3.

The GNUH8 assembler (h8300-elf-as) does not give error if attribute of a section is not specified.

4.

The 'scanf' and 'sscanf' functions of Newlib do not work for H8300HN, H8SN and H8SXN targets when '-mint32' is passed.

5. Library Generator: Refer to the following link for the known issues and limitations of this utility,
http://www.kpitgnutools.com/phpmyfaq/index.php?aktion=artikel&rubrik=001002&id=413&lang=en

HEW (For Windows OS only):

1.

In HEW, when optimised libraries are used in C++ projects, the linker generates "undefined references" error for some routines as some of the ANSI C library functions are not implemented in H8 optimised libraries.

Workaround:
The user can add his own implementation of these functions or can provide dummy
implementations depending upon the usage.

2. Library Generator: Currently, after changing the Library Generator settings, the user is prompted to open the Complier/ Linker option dialogs and click on "OK". We are aware of the inconvenience to the users and will provide a fix in future releases.

 NOTE:

Windows and GNU/Linux:

1. 

The optimised libraries are provided along with the Newlib libraries in the toolchain and do not require separate download.

2.

The optimised libraries ('liboptm.a' and 'liboptc.a') are not provided under GNU GPL. The source code of these optimised libraries is neither released nor available on request.

3.

The "libgen" utility is not provided under GNU GPL. The source code of the "libgen" utility is neither released nor available on request.